<?php

namespace Mediacosmos\CommentsBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Comment
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="Mediacosmos\CommentsBundle\Entity\CommentRepository")
 */
class Comment {

    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="comment", type="text")
     */
    private $comment;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="date", type="datetime")
     */
    private $date;

    /**
     * @ORM\ManyToOne(targetEntity="Mediacosmos\ConsultationBundle\Entity\Oeuvre")
     * @ORM\JoinColumn(nullable=false)
     */
    private $oeuvre;

    /**
     * @ORM\ManyToOne(targetEntity="Mediacosmos\UserBundle\Entity\Member")
     * @ORM\JoinColumn(nullable=false)
     */
    private $user;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId() {
        return $this->id;
    }

    /**
     * Set comment
     *
     * @param string $comment
     * @return Comment
     */
    public function setComment($comment) {
        $this->comment = $comment;

        return $this;
    }

    /**
     * Get comment
     *
     * @return string 
     */
    public function getComment() {
        return $this->comment;
    }

    /**
     * Set date
     *
     * @param \DateTime $date
     * @return Comment
     */
    public function setDate($date) {
        $this->date = $date;

        return $this;
    }

    /**
     * Get date
     *
     * @return \DateTime 
     */
    public function getDate() {
        return $this->date;
    }


    /**
     * Set oeuvre
     *
     * @param \Mediacosmos\ConsultationBundle\Entity\Oeuvre $oeuvre
     * @return Comment
     */
    public function setOeuvre(\Mediacosmos\ConsultationBundle\Entity\Oeuvre $oeuvre)
    {
        $this->oeuvre = $oeuvre;

        return $this;
    }

    /**
     * Get oeuvre
     *
     * @return \Mediacosmos\ConsultationBundle\Entity\Oeuvre 
     */
    public function getOeuvre()
    {
        return $this->oeuvre;
    }

    /**
     * Set user
     *
     * @param \Mediacosmos\UserBundle\Entity\Member $user
     * @return Comment
     */
    public function setUser(\Mediacosmos\UserBundle\Entity\Member $user)
    {
        $this->user = $user;

        return $this;
    }

    /**
     * Get user
     *
     * @return \Mediacosmos\UserBundle\Entity\Member 
     */
    public function getUser()
    {
        return $this->user;
    }
}
